package com.library.management.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.library.common.annotation.Excel;
import com.library.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * @author library
 * @describe 借阅记录vo对象
 * @date 2023/3/26
 */

public class LibraryBorrowVo extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private Integer id;
    private String reader;


    private String book;
    @JsonFormat(
            pattern = "yyyy-MM-dd"
    )
    @Excel(
            name = "借出时间",
            width = 30.0,
            dateFormat = "yyyy-MM-dd"
    )
    private Date borrowTime;
    @JsonFormat(
            pattern = "yyyy-MM-dd"
    )
    @Excel(
            name = "归还时间",
            width = 30.0,
            dateFormat = "yyyy-MM-dd"
    )
    private Date returnTime;

    public LibraryBorrowVo() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getReader() {
        return this.reader;
    }

    public void setReader(String reader) {
        this.reader = reader;
    }

    public String getBook() {
        return this.book;
    }

    public void setBook(String book) {
        this.book = book;
    }

    public Date getBorrowTime() {
        return this.borrowTime;
    }

    public void setBorrowTime(Date borrowTime) {
        this.borrowTime = borrowTime;
    }

    public Date getReturnTime() {
        return this.returnTime;
    }

    public void setReturnTime(Date returnTime) {
        this.returnTime = returnTime;
    }

    public String toString() {
        return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
                .append("id", this.getId())
                .append("reader", this.getReader())
                .append("book", this.getBook())
                .append("borrowTime", this.getBorrowTime())
                .append("returnTime", this.getReturnTime()).toString();
    }
}
